package br.com.assemble.hermeserp.model.pojos.enderecamento;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import br.com.assemble.hermeserp.ejb.annotation.DaoClass;
import br.com.assemble.hermeserp.model.BasePojo;
import br.com.assemble.hermeserp.model.pojos.financeiro.EnderecoCobranca;
import br.com.assemble.hermeserp.model.pojos.pessoas.Pessoa;


/**
 * The persistent class for the ENDERECAMENTOS database table.
 * 
 */
@Entity
@Table(name="ENDERECAMENTOS")
@DaoClass(value="EnderecamentoDao", pu="hermes-pu")
public class Enderecamento extends BasePojo implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="END_IDENTIFY", unique=true, nullable=false)
	private BigInteger endIdentify;

	@Column(name="END_COMPLEMENTO", length=50)
	private String endComplemento;

	//bi-directional many-to-one association to Bairro
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="BAI_IDENTIFY", nullable=false)
	private Bairro bairro;

	//bi-directional many-to-one association to Cep
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="CEP_IDENTIFY", nullable=false)
	private Cep cep;

	//bi-directional many-to-one association to Logradouro
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="LOG_IDENTIFY", nullable=false)
	private Logradouro logradouro;

	//bi-directional many-to-one association to TipoLogradouro
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="TPL_IDENTIFY", nullable=false)
	private TipoLogradouro tipoLogradouro;

	//bi-directional many-to-one association to EnderecoCobranca
	@OneToMany(mappedBy="enderecamento")
	private List<EnderecoCobranca> enderecoCobrancaCollection;

	//bi-directional many-to-one association to Pessoa
	@OneToMany(mappedBy="enderecamento")
	private List<Pessoa> pessoaCollection;

    public Enderecamento() {
    }

	public BigInteger getEndIdentify() {
		return this.endIdentify;
	}

	public void setEndIdentify(BigInteger endIdentify) {
		this.endIdentify = endIdentify;
	}

	public String getEndComplemento() {
		return this.endComplemento;
	}

	public void setEndComplemento(String endComplemento) {
		this.endComplemento = endComplemento;
	}

	public Bairro getBairro() {
		return this.bairro;
	}

	public void setBairro(Bairro bairro) {
		this.bairro = bairro;
	}
	
	public Cep getCep() {
		return this.cep;
	}

	public void setCep(Cep cep) {
		this.cep = cep;
	}
	
	public Logradouro getLogradouro() {
		return this.logradouro;
	}

	public void setLogradouro(Logradouro logradouro) {
		this.logradouro = logradouro;
	}
	
	public TipoLogradouro getTipoLogradouro() {
		return this.tipoLogradouro;
	}

	public void setTipoLogradouro(TipoLogradouro tipoLogradouro) {
		this.tipoLogradouro = tipoLogradouro;
	}
	
	public List<EnderecoCobranca> getEnderecoCobrancaCollection() {
		return this.enderecoCobrancaCollection;
	}

	public void setEnderecoCobrancaCollection(List<EnderecoCobranca> enderecoCobrancaCollection) {
		this.enderecoCobrancaCollection = enderecoCobrancaCollection;
	}
	
	public List<Pessoa> getPessoaCollection() {
		return this.pessoaCollection;
	}

	public void setPessoaCollection(List<Pessoa> pessoaCollection) {
		this.pessoaCollection = pessoaCollection;
	}
	
}